layui.use(top.layuiuse, function () {
        var $ = layui.jquery;
        var kaAjax = layui.kaAjax;
        var kahtml = layui.kahtml;
        var kaBgUrl = layui.kaBgUrl;
        var table = layui.table;
        //初始化ID
        var registerkey = kaRegisterPrimaryKey.registerId(["kaAccountInfo", "kaAccountInfoinfoMain", "kaAccountInfoinfoRight", "kaAccountInfoinfoMain_v1", "kaAccountInfoinfoRightMain", "kaAccountInfoinfoRight_V1", "kaAccountInfoinfoRight_V2", "kaAccountInfoinfoRight_V3", "kaAccountInfoinfoRight_V4", "kaAccountInfoinfoRighInfo"]);
        if (registerkey.judge) {
            var kahtml = layui.kahtml;
            // 表格分栅格
            gridHtmlData = {
                id: registerkey.ids[0],
                colSpace: 20, // Grid 间隔
                list: [{
                    id: registerkey.ids[1],
                    colXs: 4
                }, {
                    id: registerkey.ids[2],
                    colXs: 8
                }] // 循环数据
            }
            kahtml.getTemplateHtml("grid", gridHtmlData);
            // 面板1
            panelHtmlData1 = {
                id: registerkey.ids[1],
                list: [{
                    id: registerkey.ids[3],
                    style: "padding-left: 10px;padding-right: 10px;"
                }]
            }
            kahtml.getTemplateHtml("panel", panelHtmlData1);
            // 面板2
            panelHtmlData2 = {
                id: registerkey.ids[2],
                list: [{
                    id: registerkey.ids[9],
                    style: "padding-left: 10px;padding-right: 10px;"
                }]
            }
            kahtml.getTemplateHtml("panel", panelHtmlData2);
            //加载左侧
            top.currentUser = layui.kaCurrentUser.get().data;
            var currentUserRoles = layui.kaCurrentUser.get().roles;
            $("#" + registerkey.ids[3]).html(layui.kaHtmlStatic.v3(currentUserRoles));
            // 渲染图片上传
            layui.kaCroppers.render({
                elem: "#kaAccountInfoUpdateHeadClick",
                saveW: 1000,
                saveH: 1000,
                mark: 1 / 1, //选取比例
                area: '900px', //弹窗宽度,url:"/admin/upload"//图片上传接口返回和(layui 的upload 模块)返回的J0SN-done:function(path){//上传完毕回调
                returnType: "base64",
                done: function (path) {
                    $("#kaAccountInfoUpdateHeadImg").attr("src", path);
                    layui.layer.closeAll();
                }
            });
            // 渲染Tab 页
            var tabsHtmlData1 = {
                id: registerkey.ids[9],
                list: [{
                    id: registerkey.ids[5],
                    list: [{
                        id: registerkey.ids[6],
                        layuithis: 1,
                        title: "基本设置",
                        style: "height: 500px;"
                    }, {
                        id: registerkey.ids[7],
                        layuithis: 0,
                        title: "修改密码",
                        style: "height: 500px;"
                    }, {
                        id: registerkey.ids[8],
                        layuithis: 0,
                        title: "在线设备",
                        style: "height: 500px;"
                    }]
                }]
            }
            kahtml.getTemplateHtml("tabs", tabsHtmlData1);
            kahtml.refreshTabs(registerkey.ids[5]); //渲染标签页
            $("#" + registerkey.ids[6]).html(`<iframe id="b" type="_iframe" data-frameid="b" scrolling="auto" frameborder="0" src="/formRendering.html?id=3" style="width:100%;height: calc(100% - 6px);" allowfullscreen="true"></iframe>`);
            $("#" + registerkey.ids[7]).html(`<iframe id="b" type="_iframe" data-frameid="b" scrolling="auto" frameborder="0" src="/formRendering.html?id=2" style="width:100%;height: calc(100% - 6px);" allowfullscreen="true"></iframe>`);
            // 已知数据渲染
            loadingWatermark(top.layui.watermark, { id: "#" + registerkey.ids[3] });
            loadingWatermark(top.layui.watermark, { id: "#" + registerkey.ids[9] });
            $("#" + registerkey.ids[8]).html(`<iframe id="b" type="_iframe" data-frameid="b" scrolling="auto" frameborder="0" src="/dataGrid.html?id=1" style="width:100%;height: calc(100% - 6px);" allowfullscreen="true"></iframe>`);
        }
    })